<!DOCTYPE html>
<html>

<head>
  <title>Quarkus - Datasources</title>
  <script id="adobe_dtm" src="https://www.redhat.com/dtm.js" type="text/javascript"></script>
  <script src="/assets/javascript/highlight.pack.js" type="text/javascript"></script>
  <META HTTP-EQUIV='Content-Security-Policy' CONTENT="default-src 'none'; script-src 'self' 'unsafe-eval' 'sha256-ANpuoVzuSex6VhqpYgsG25OHWVA1I+F6aGU04LoI+5s=' 'sha256-ipy9P/3rZZW06mTLAR0EnXvxSNcnfSDPLDuh3kzbB1w=' js.bizographics.com https://www.redhat.com assets.adobedtm.com jsonip.com https://ajax.googleapis.com https://www.googletagmanager.com https://www.google-analytics.com https://use.fontawesome.com; style-src 'self' https://fonts.googleapis.com https://use.fontawesome.com; img-src 'self' *; media-src 'self' ; frame-src https://www.googletagmanager.com https://www.youtube.com; frame-ancestors 'none'; base-uri 'none'; object-src 'none'; form-action 'none'; font-src 'self' https://use.fontawesome.com https://fonts.gstatic.com;">
  <META HTTP-EQUIV='X-Frame-Options' CONTENT="DENY">
  <META HTTP-EQUIV='X-XSS-Protection' CONTENT="1; mode=block">
  <META HTTP-EQUIV='X-Content-Type-Options' CONTENT="nosniff">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="Quarkus: Supersonic Subatomic Java">
  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:site" content="@QuarkusIO"> 
  <meta name="twitter:creator" content="@QuarkusIO">
  <meta property="og:url" content="https://quarkus.io/guides/datasource" />
  <meta property="og:title" content="Quarkus - Datasources" />
  <meta property="og:description" content="Quarkus: Supersonic Subatomic Java" />
  <meta property="og:image" content="/assets/images/quarkus_card.png" />
  <link rel="canonical" href="https://quarkus.io/guides/datasource">
  <link rel="shortcut icon" type="image/png" href="/favicon.ico" >
  <link rel="stylesheet" href="https://quarkus.io/guides/stylesheet/config.css" />
  <link rel="stylesheet" href="/assets/css/main.css" />
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
  <link rel="alternate" type="application/rss+xml"  href="https://quarkus.io/feed.xml" title="Quarkus">
  <script src="https://quarkus.io/assets/javascript/goan.js" type="text/javascript"></script>
  <script src="https://quarkus.io/assets/javascript/hl.js" type="text/javascript"></script>
</head>

<body class="guides">
  <!-- Google Tag Manager (noscript) -->
  <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NJWS5L"
  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  <!-- End Google Tag Manager (noscript) -->

  <div class="nav-wrapper">
  <div class="grid-wrapper">
    <div class="width-12-12">
      <input type="checkbox" id="checkbox" />
      <nav id="main-nav" class="main-nav">
  <div class="container">
    <div class="logo-wrapper">
      
        <a href="/"><img src="/assets/images/quarkus_logo_horizontal_rgb_600px_reverse.png" class="project-logo" title="Quarkus"></a>
      
    </div>
    <label class="nav-toggle" for="checkbox">
      <i class="fa fa-bars"></i>
    </label>
    <div id="menu" class="menu">
      <span>
        <a href="/get-started/" class="">Get Started</a>
      </span>
      <span>
        <a href="/guides/" class="active">Guides</a>
      </span>
      <span>
        <a href="/community/" class="">Community</a>
      </span>
      <span>
        <a href="/support/" class="">Support</a>
      </span>
      <span>
        <a href="/blog/" class="">Blog</a>
      </span>
      <span>
        <a href="https://code.quarkus.io" class="button-cta secondary white">Start Coding</a>
      </span>
    </div>
  </div>
      </nav>
    </div>
  </div>
</div>

  <div class="content">
    <div class="guide">
  <div class="width-12-12">
    <h1 class="text-caps">Quarkus - Datasources</h1>
    <div class="hide-mobile toc"><ul class="sectlevel1">
<li><a href="#tldr">TL;DR</a>
<ul class="sectlevel2">
<li><a href="#jdbc-datasource">JDBC datasource</a></li>
<li><a href="#reactive-datasource">Reactive datasource</a></li>
</ul>
</li>
<li><a href="#default-datasource">Default datasource</a>
<ul class="sectlevel2">
<li><a href="#jdbc-datasource-2">JDBC datasource</a></li>
<li><a href="#reactive-datasource-2">Reactive datasource</a></li>
<li><a href="#jdbc-and-reactive-datasources-simultaneously">JDBC and reactive datasources simultaneously</a></li>
</ul>
</li>
<li><a href="#multiple-datasources">Multiple Datasources</a>
<ul class="sectlevel2">
<li><a href="#configuring-multiple-datasources">Configuring Multiple Datasources</a></li>
<li><a href="#named-datasource-injection">Named Datasource Injection</a></li>
</ul>
</li>
<li><a href="#datasource-health-check">Datasource Health Check</a></li>
<li><a href="#datasource-metrics">Datasource Metrics</a></li>
<li><a href="#narayana-transaction-manager-integration">Narayana Transaction Manager integration</a></li>
<li><a href="#in-memory-databases">Testing with in-memory databases</a></li>
<li><a href="#configuration-reference">Common Datasource Configuration Reference</a></li>
<li><a href="#jdbc-configuration">JDBC Configuration Reference</a></li>
<li><a href="#jdbc-url">JDBC URL Reference</a>
<ul class="sectlevel2">
<li><a href="#h2">H2</a></li>
<li><a href="#postgresql">PostgreSQL</a></li>
<li><a href="#db2">DB2</a></li>
<li><a href="#mariadb">MariaDB</a></li>
<li><a href="#mysql">MySQL</a></li>
<li><a href="#microsoft-sql-server">Microsoft SQL Server</a></li>
<li><a href="#derby">Derby</a></li>
</ul>
</li>
<li><a href="#reactive-configuration">Reactive Datasource Configuration Reference</a>
<ul class="sectlevel2">
<li><a href="#reactive-db2-configuration">Reactive DB2 Configuration</a></li>
<li><a href="#reactive-mariadbmysql-specific-configuration">Reactive MariaDB/MySQL Specific Configuration</a></li>
<li><a href="#reactive-postgresql-specific-configuration">Reactive PostgreSQL Specific Configuration</a></li>
</ul>
</li>
</ul></div>
    <div>
      <div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>Many projects that use data require connections to a relational database.</p>
</div>
<div class="paragraph">
<p>The usual way of obtaining connections to a database is to use a datasource and configure a JDBC driver.
But you might also prefer using a reactive driver to connect to your database in a reactive way.</p>
</div>
<div class="paragraph">
<p>Quarkus has you covered either way:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>For JDBC, the preferred datasource and connection pooling implementation is <a href="https://agroal.github.io/">Agroal</a>.</p>
</li>
<li>
<p>For reactive, we use the <a href="https://vertx.io/">Vert.x</a> reactive drivers.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Both are configured via unified and flexible configuration.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Agroal is a modern, light weight connection pool implementation designed for very high performance and scalability,
and features first class integration with the other components in Quarkus, such as security, transaction management components, health metrics.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>This guide will explain how to:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>configure a datasource, or multiple datasources</p>
</li>
<li>
<p>how to obtain a reference to those datasources in code</p>
</li>
<li>
<p>which pool tuning configuration properties are available</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>This guide is mainly about datasource configuration.
If you want more details about how to consume and make use of a reactive datasource,
please refer to the <a href="reactive-sql-clients">Reactive SQL clients guide</a>.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="tldr"><a class="anchor" href="#tldr"></a>TL;DR</h2>
<div class="sectionbody">
<div class="paragraph">
<p>This is a quick introduction to datasource configuration.
If you want a better understanding of how all this works, this guide has a lot more information in the subsequent paragraphs.</p>
</div>
<div class="sect2">
<h3 id="jdbc-datasource"><a class="anchor" href="#jdbc-datasource"></a>JDBC datasource</h3>
<div class="paragraph">
<p>Add the <code>agroal</code> extension plus one of <code>jdbc-db2</code>, <code>jdbc-derby</code>, <code>jdbc-h2</code>, <code>jdbc-mariadb</code>, <code>jdbc-mssql</code>, <code>jdbc-mysql</code>, or <code>jdbc-postgresql</code>.</p>
</div>
<div class="paragraph">
<p>Then configure your datasource:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=&lt;your username&gt;
quarkus.datasource.password=&lt;your password&gt;

quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/hibernate_orm_test
quarkus.datasource.jdbc.min-size=4
quarkus.datasource.jdbc.max-size=16</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="reactive-datasource"><a class="anchor" href="#reactive-datasource"></a>Reactive datasource</h3>
<div class="paragraph">
<p>Add the correct reactive extension for the database you are using: <code>reactive-pg-client</code>, <code>reactive-mysql-client</code>, or <code>reactive-db2-client</code>.</p>
</div>
<div class="paragraph">
<p>Then configure your reactive datasource:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=&lt;your username&gt;
quarkus.datasource.password=&lt;your password&gt;

quarkus.datasource.reactive.url=postgresql:///your_database
quarkus.datasource.reactive.max-size=20</code></pre>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="default-datasource"><a class="anchor" href="#default-datasource"></a>Default datasource</h2>
<div class="sectionbody">
<div class="paragraph">
<p>A datasource can be either a JDBC datasource, a reactive one or both.
It all depends on how you configure it and which extensions you added to your project.</p>
</div>
<div class="paragraph">
<p>To define a datasource, start with the following:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.datasource.db-kind=h2</code></pre>
</div>
</div>
<div class="paragraph">
<p>The database kind defines which type of database you will connect to.</p>
</div>
<div class="paragraph">
<p>We currently include these built-in database kinds:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>DB2: <code>db2</code></p>
</li>
<li>
<p>Derby: <code>derby</code></p>
</li>
<li>
<p>H2: <code>h2</code></p>
</li>
<li>
<p>MariaDB: <code>mariadb</code></p>
</li>
<li>
<p>Microsoft SQL Server: <code>mssql</code></p>
</li>
<li>
<p>MySQL: <code>mysql</code></p>
</li>
<li>
<p>PostgreSQL: <code>postgresql</code>, <code>pgsql</code> or <code>pg</code></p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Giving Quarkus the database kind you are targeting will facilitate configuration.
By using a JDBC driver extension and setting the kind in the configuration,
Quarkus resolves the JDBC driver automatically,
so you don&#8217;t need to configure it yourself.
If you want to use a database kind that is not part of the built-in ones, use <code>other</code> and define the JDBC driver explicitly.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p>You can use any JDBC driver in a Quarkus app in JVM mode (see <a href="#other-databases">Using other databases</a>).
It is unlikely that it will work when compiling your application to a native executable though.</p>
</div>
<div class="paragraph">
<p>If you plan to make a native executable, we recommend you use the existing JDBC Quarkus extensions (or contribute one for your driver).</p>
</div>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>There is a good chance you will need to define some credentials to access your database.</p>
</div>
<div class="paragraph">
<p>This is done by configuring the following properties:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.datasource.username=&lt;your username&gt;
quarkus.datasource.password=&lt;your password&gt;</code></pre>
</div>
</div>
<div class="paragraph">
<p>You can also retrieve the password from Vault by <a href="vault-datasource">using a credential provider</a> for your datasource.</p>
</div>
<div class="paragraph">
<p>Once you have defined the database kind and the credentials, you are ready to configure either a JDBC datasource, a reactive one, or both.</p>
</div>
<div class="sect2">
<h3 id="jdbc-datasource-2"><a class="anchor" href="#jdbc-datasource-2"></a>JDBC datasource</h3>
<div class="paragraph">
<p>JDBC is the most common database connection pattern.
You typically need a JDBC datasource when using Hibernate ORM.</p>
</div>
<div class="sect3">
<h4 id="install-the-maven-dependencies"><a class="anchor" href="#install-the-maven-dependencies"></a>Install the Maven dependencies</h4>
<div class="paragraph">
<p>First, you will need to add the <code>quarkus-agroal</code> dependency to your project.</p>
</div>
<div class="paragraph">
<p>You can add it using a simple Maven command:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="shell" class="language-shell hljs">./mvnw quarkus:add-extension -Dextensions="agroal"</code></pre>
</div>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Agroal comes as a transitive dependency of the Hibernate ORM extension so if you are using Hibernate ORM,
you don&#8217;t need to add the Agroal extension dependency explicitly.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>You will also need to choose, and add, the Quarkus extension for your relational database driver.</p>
</div>
<div class="paragraph">
<p>Quarkus provides driver extensions for:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>DB2 - <code>jdbc-db2</code></p>
</li>
<li>
<p>Derby - <code>jdbc-derby</code></p>
</li>
<li>
<p>H2 - <code>jdbc-h2</code></p>
</li>
<li>
<p>MariaDB - <code>jdbc-mariadb</code></p>
</li>
<li>
<p>Microsoft SQL Server - <code>jdbc-mssql</code></p>
</li>
<li>
<p>MySQL - <code>jdbc-mysql</code></p>
</li>
<li>
<p>PostgreSQL - <code>jdbc-postgresql</code></p>
</li>
</ul>
</div>
<div class="paragraph">
<p>See <a href="#other-databases">Use a database with no built-in extension or with a different driver</a> if you want to use a JDBC driver for another database.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p>The H2 and Derby databases can normally be configured to run in "embedded mode";
the extension does not support compiling the embedded database engine into native executables.</p>
</div>
<div class="paragraph">
<p>Read <a href="#in-memory-databases">Testing with in-memory databases</a> (below) for suggestions regarding integration testing.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>As usual, you can install the extension using <code>add-extension</code>.</p>
</div>
<div class="paragraph">
<p>To install the PostgreSQL driver dependency for instance, run the following command:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="shell" class="language-shell hljs">./mvnw quarkus:add-extension -Dextensions="jdbc-postgresql"</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="configure-the-jdbc-connection"><a class="anchor" href="#configure-the-jdbc-connection"></a>Configure the JDBC connection</h4>
<div class="paragraph">
<p>Configuring your JDBC connection is easy, the only mandatory property is the JDBC URL.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/hibernate_orm_test</code></pre>
</div>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Note the <code>jdbc</code> prefix in the property name.
All the configuration properties specific to JDBC have this prefix.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
<div class="paragraph">
<p>For more information about the JDBC URL format, please refer to the <a href="#jdbc-url">JDBC url reference section</a>.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>When using one of the built-in datasource kinds, the JDBC driver is resolved automatically to the following values:</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 1. Database kind to JDBC driver mapping</caption>
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Database kind</th>
<th class="tableblock halign-left valign-top">JDBC driver</th>
<th class="tableblock halign-left valign-top">XA driver</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>db2</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>com.ibm.db2.jcc.DBDriver</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>com.ibm.db2.jcc.DB2XADataSource</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>derby</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.apache.derby.jdbc.ClientDriver</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.apache.derby.jdbc.ClientXADataSource</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>h2</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.h2.Driver</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.h2.jdbcx.JdbcDataSource</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>mariadb</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.mariadb.jdbc.Driver</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.mariadb.jdbc.MySQLDataSource</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>mssql</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>com.microsoft.sqlserver.jdbc.SQLServerDriver</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>mysql</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>com.mysql.cj.jdbc.Driver</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>com.mysql.cj.jdbc.MysqlXADataSource</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>postgresql</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.postgresql.Driver</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.postgresql.xa.PGXADataSource</code></p></td>
</tr>
</tbody>
</table>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
<div class="paragraph">
<p>As previously stated, most of the time, this automatic resolution will suit you and
you won&#8217;t need to configure the driver.</p>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="sect3">
<h4 id="other-databases"><a class="anchor" href="#other-databases"></a>Use a database with no built-in extension or with a different driver</h4>
<div class="paragraph">
<p>You can use a specific driver if you need to (for instance for using the OpenTracing driver)
or if you want to use a database for which Quarkus does not have a built-in JDBC driver extension.</p>
</div>
<div class="paragraph">
<p>Without an extension, the driver will work fine in any Quarkus app running in JVM mode.
It is unlikely that it will work when compiling your application to a native executable though.
If you plan to make a native executable, we recommend you use the existing JDBC Quarkus extensions (or contribute one for your driver).</p>
</div>
<div class="paragraph">
<p>Here is how you would use the OpenTracing driver:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.datasource.jdbc.driver=io.opentracing.contrib.jdbc.TracingDriver</code></pre>
</div>
</div>
<div class="paragraph">
<p>Here is how you would define access to a database with no built-in support (in JVM mode):</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.datasource.db-kind=other
quarkus.datasource.jdbc.driver=oracle.jdbc.driver.OracleDriver
quarkus.datasource.jdbc.url=jdbc:oracle:thin:@192.168.1.12:1521/ORCL_SVC
quarkus.datasource.username=scott
quarkus.datasource.password=tiger</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="more-configuration"><a class="anchor" href="#more-configuration"></a>More configuration</h4>
<div class="paragraph">
<p>You can configure a lot more things, for instance the size of the connection pool.</p>
</div>
<div class="paragraph">
<p>Please refer to the <a href="#jdbc-configuration">JDBC configuration reference</a> for all the details about the JDBC configuration knobs.</p>
</div>
</div>
<div class="sect3">
<h4 id="consuming-the-datasource"><a class="anchor" href="#consuming-the-datasource"></a>Consuming the datasource</h4>
<div class="paragraph">
<p>If you are using Hibernate ORM, the datasource will be consumed automatically.</p>
</div>
<div class="paragraph">
<p>If for whatever reason, access to the datasource is needed in code, it can be obtained as any other bean in the following manner:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">@Inject
AgroalDataSource defaultDataSource;</code></pre>
</div>
</div>
<div class="paragraph">
<p>In the above example, the type is <code>AgroalDataSource</code> which is a subtype of <code>javax.sql.DataSource</code>.
Because of this, you can also use <code>javax.sql.DataSource</code> as the injected type.</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="reactive-datasource-2"><a class="anchor" href="#reactive-datasource-2"></a>Reactive datasource</h3>
<div class="paragraph">
<p>If you prefer using a reactive datasource, Quarkus offers DB2, MySQL/MariaDB, and PostgreSQL reactive clients.</p>
</div>
<div class="sect3">
<h4 id="install-the-maven-dependencies-2"><a class="anchor" href="#install-the-maven-dependencies-2"></a>Install the Maven dependencies</h4>
<div class="paragraph">
<p>Depending on which database you want to use, add the corresponding extension:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>DB2: <code>quarkus-reactive-db2-client</code></p>
</li>
<li>
<p>MySQL/MariaDB: <code>quarkus-reactive-mysql-client</code></p>
</li>
<li>
<p>PostgreSQL: <code>quarkus-reactive-pg-client</code></p>
</li>
</ul>
</div>
<div class="paragraph">
<p>The installed extension must be consistent with the <code>quarkus.datasource.db-kind</code> you define in your datasource configuration.</p>
</div>
</div>
<div class="sect3">
<h4 id="configure-the-reactive-datasource"><a class="anchor" href="#configure-the-reactive-datasource"></a>Configure the reactive datasource</h4>
<div class="paragraph">
<p>Once the driver is there, you just need to configure the connection URL.</p>
</div>
<div class="paragraph">
<p>Optionally, but highly recommended, you should define a proper size for your connection pool.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.datasource.reactive.url=postgresql:///your_database
quarkus.datasource.reactive.max-size=20</code></pre>
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="jdbc-and-reactive-datasources-simultaneously"><a class="anchor" href="#jdbc-and-reactive-datasources-simultaneously"></a>JDBC and reactive datasources simultaneously</h3>
<div class="paragraph">
<p>By default, if you include both a JDBC extension (+ Agroal) and a reactive datasource extension handling the given database kind,
both will be created.</p>
</div>
<div class="paragraph">
<p>If you want to disable the JDBC datasource explicitly, use:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.datasource.jdbc=false</code></pre>
</div>
</div>
<div class="paragraph">
<p>If you want to disable the reactive datasource explicitly, use:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.datasource.reactive=false</code></pre>
</div>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Most of the time, the configuration above won&#8217;t be necessary as either a JDBC driver or a reactive datasource extension will be present and not both.</p>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="multiple-datasources"><a class="anchor" href="#multiple-datasources"></a>Multiple Datasources</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="configuring-multiple-datasources"><a class="anchor" href="#configuring-multiple-datasources"></a>Configuring Multiple Datasources</h3>
<div class="paragraph">
<p>For now, multiple datasources are only supported for JDBC and the Agroal extension.
So it is not currently possible to create multiple reactive datasources.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Currently, Hibernate ORM supports only one persistence unit which uses the default datasource.
If you want to use multiple datasources, you will need to manipulate them directly.</p>
</div>
<div class="paragraph">
<p>Multiple persistence units support is planned for a future version of Quarkus.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Defining multiple datasources works exactly the same way as defining a single datasource, with one important change:
you define a name.</p>
</div>
<div class="paragraph">
<p>In the following example, you have 3 different datasources:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>The default one,</p>
</li>
<li>
<p>A datasource named <code>users</code>,</p>
</li>
<li>
<p>A datasource named <code>inventory</code>,</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>each with its own configuration.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.datasource.db-kind=h2
quarkus.datasource.username=username-default
quarkus.datasource.jdbc.url=jdbc:h2:tcp://localhost/mem:default
quarkus.datasource.jdbc.min-size=3
quarkus.datasource.jdbc.max-size=13

quarkus.datasource.users.db-kind=h2
quarkus.datasource.users.username=username1
quarkus.datasource.users.jdbc.url=jdbc:h2:tcp://localhost/mem:users
quarkus.datasource.users.jdbc.min-size=1
quarkus.datasource.users.jdbc.max-size=11

quarkus.datasource.inventory.db-kind=h2
quarkus.datasource.inventory.username=username2
quarkus.datasource.inventory.jdbc.url=jdbc:h2:tcp://localhost/mem:inventory
quarkus.datasource.inventory.jdbc.min-size=2
quarkus.datasource.inventory.jdbc.max-size=12</code></pre>
</div>
</div>
<div class="paragraph">
<p>Notice there is an extra bit in the key.
The syntax is as follows: <code>quarkus.datasource.[optional name.][datasource property]</code>.</p>
</div>
</div>
<div class="sect2">
<h3 id="named-datasource-injection"><a class="anchor" href="#named-datasource-injection"></a>Named Datasource Injection</h3>
<div class="paragraph">
<p>When using multiple datasources, each <code>DataSource</code> also has the <code>io.quarkus.agroal.DataSource</code> qualifier with the name of the datasource as the value.
Using the above properties to configure three different datasources, you can also inject each one as follows:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">@Inject
AgroalDataSource defaultDataSource;

@Inject
@DataSource("users")
AgroalDataSource usersDataSource;

@Inject
@DataSource("inventory")
AgroalDataSource inventoryDataSource;</code></pre>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="datasource-health-check"><a class="anchor" href="#datasource-health-check"></a>Datasource Health Check</h2>
<div class="sectionbody">
<div class="paragraph">
<p>If you are using the <code>quarkus-smallrye-health</code> extension, the <code>quarkus-agroal</code> and reactive client extensions will automatically add a readiness health check
to validate the datasource.</p>
</div>
<div class="paragraph">
<p>So when you access the <code>/health/ready</code> endpoint of your application you will have information about the datasource validation status.
If you have multiple datasources, all datasources will be checked and the status will be <code>DOWN</code> as soon as there is one datasource validation failure.</p>
</div>
<div class="paragraph">
<p>This behavior can be disabled via the property <code>quarkus.datasource.health.enabled</code>.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="datasource-metrics"><a class="anchor" href="#datasource-metrics"></a>Datasource Metrics</h2>
<div class="sectionbody">
<div class="paragraph">
<p>If you are using the <code>quarkus-smallrye-metrics</code> extension, <code>quarkus-agroal</code> can expose some data source metrics on the
<code>/metrics</code> endpoint. This can be turned on by setting the property <code>quarkus.datasource.metrics.enabled</code> to true.</p>
</div>
<div class="paragraph">
<p>For the exposed metrics to contain any actual values, it is necessary that metric collection is enabled internally
by Agroal mechanisms. By default, this metric collection mechanism gets turned on for all data sources if the <code>quarkus-smallrye-metrics</code>
is present and metrics for the Agroal extension are enabled. If you want to disable metrics for a particular data source,
this can be done by setting <code>quarkus.datasource.jdbc.enable-metrics</code> to <code>false</code> (or <code>quarkus.datasource.&lt;datasource name&gt;.jdbc.enable-metrics</code> for a named datasource).
This disables collecting the metrics as well as exposing them in the <code>/metrics</code> endpoint,
because it does not make sense to expose metrics if the mechanism to collect them is disabled.</p>
</div>
<div class="paragraph">
<p>Conversely, setting <code>quarkus.datasource.jdbc.enable-metrics</code> to <code>true</code> (or <code>quarkus.datasource.&lt;datasource name&gt;.jdbc.enable-metrics</code> for a named datasource) explicitly can be used to enable collection of metrics even if
the <code>quarkus-smallrye-metrics</code> extension is not in use.
This can be useful if you need to access the collected metrics programmatically.
They are available after calling <code>dataSource.getMetrics()</code> on an injected <code>AgroalDataSource</code> instance. If collection of metrics is disabled
for this data source, all values will be zero.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="narayana-transaction-manager-integration"><a class="anchor" href="#narayana-transaction-manager-integration"></a>Narayana Transaction Manager integration</h2>
<div class="sectionbody">
<div class="paragraph">
<p>If the Narayana JTA extension is also available, integration is automatic.</p>
</div>
<div class="paragraph">
<p>You can override this by setting the <code>transactions</code> configuration property - see the <a href="#configuration-reference">Configuration Reference</a> below.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="in-memory-databases"><a class="anchor" href="#in-memory-databases"></a>Testing with in-memory databases</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Some databases like H2 and Derby are commonly used in "embedded mode" as a facility to run quick integration tests.</p>
</div>
<div class="paragraph">
<p>Our suggestion is to use the real database you intend to use in production; container technologies made this simple enough so you no longer have an excuse. Still, there are sometimes
good reasons to also want the ability to run quick integration tests using the JVM powered databases,
so this is possible as well.</p>
</div>
<div class="paragraph">
<p>It is important to remember that when configuring H2 (or Derby) to use the embedded engine,
this will work as usual in JVM mode but such an application will not compile into a native executable, as the Quarkus extensions only cover for making the JDBC client code compatible with the native compilation step: embedding the whole database engine into a native executable is currently not implemented.</p>
</div>
<div class="paragraph">
<p>If you plan to run such integration tests in the JVM exclusively, it will of course work as usual.</p>
</div>
<div class="paragraph">
<p>If you want the ability to run such integration test in both JVM and/or native executables, we have some cool helpers for you: just add either <code>@QuarkusTestResource(H2DatabaseTestResource.class)</code> or <code>@QuarkusTestResource(DerbyDatabaseTestResource.class)</code> on any class in your integration tests, this will make sure the test suite starts (and stops) the embedded database into a separate process as necessary to run your tests.</p>
</div>
<div class="paragraph">
<p>These additional helpers are provided by the artifacts having Maven coordinates <code>io.quarkus:quarkus-test-h2</code> and <code>io.quarkus:quarkus-test-derby</code>, respectively for H2 and Derby.</p>
</div>
<div class="paragraph">
<p>Follows an example for H2:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">package my.app.integrationtests.db;

import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.h2.H2DatabaseTestResource;

@QuarkusTestResource(H2DatabaseTestResource.class)
public class TestResources {
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>This will allow you to test your application even when it&#8217;s compiled into a native executable,
while the database will run in the JVM as usual.</p>
</div>
<div class="paragraph">
<p>Connect to it using:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs">quarkus.datasource.db-kind=h2
quarkus.datasource.jdbc.url=jdbc:h2:tcp://localhost/mem:test</code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="configuration-reference"><a class="anchor" href="#configuration-reference"></a>Common Datasource Configuration Reference</h2>
<div class="sectionbody">
<div class="paragraph configuration-legend">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> Configuration property fixed at build time - All other configuration properties are overridable at runtime</p>
</div>
<table class="tableblock frame-all grid-all stretch configuration-reference searchable">
<colgroup>
<col style="width: 80%;">
<col style="width: 10%;">
<col style="width: 10%;">
</colgroup>
<tbody>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-datasource_configuration"></a><a href="#quarkus-datasource_configuration">Configuration property</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-datasource_quarkus.datasource.db-kind"></a><code><a href="#quarkus-datasource_quarkus.datasource.db-kind">quarkus.datasource.db-kind</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The kind of database we will connect to (e.g. h2, postgresql&#8230;&#8203;).</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-datasource_quarkus.datasource.health.enabled"></a><code><a href="#quarkus-datasource_quarkus.datasource.health.enabled">quarkus.datasource.health.enabled</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether or not an health check is published in case the smallrye-health extension is present.
 This is a global setting and is not specific to a datasource.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-datasource_quarkus.datasource.metrics.enabled"></a><code><a href="#quarkus-datasource_quarkus.datasource.metrics.enabled">quarkus.datasource.metrics.enabled</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether or not datasource metrics are published in case the smallrye-metrics extension is present.
 This is a global setting and is not specific to a datasource.
 NOTE: This is different from the "jdbc.enable-metrics" property that needs to be set on the JDBC datasource level to enable collection of metrics for that datasource.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-datasource_quarkus.datasource.username"></a><code><a href="#quarkus-datasource_quarkus.datasource.username">quarkus.datasource.username</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource username</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-datasource_quarkus.datasource.password"></a><code><a href="#quarkus-datasource_quarkus.datasource.password">quarkus.datasource.password</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource password</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-datasource_quarkus.datasource.credentials-provider"></a><code><a href="#quarkus-datasource_quarkus.datasource.credentials-provider">quarkus.datasource.credentials-provider</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The credentials provider name</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-datasource_quarkus.datasource.credentials-provider-name"></a><code><a href="#quarkus-datasource_quarkus.datasource.credentials-provider-name">quarkus.datasource.credentials-provider-name</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The credentials provider bean name.
 It is the <code>&amp;#64;Named</code> value of the credentials provider bean. It is used to discriminate if multiple CredentialsProvider beans are available.
 For Vault it is: vault-credentials-provider. Not necessary if there is only one credentials provider available.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-datasource_quarkus.datasource.max-size"></a><code><a href="#quarkus-datasource_quarkus.datasource.max-size">quarkus.datasource.max-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">

</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>20</code></p></td>
</tr>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-datasource_quarkus.datasource.named-data-sources"></a><a href="#quarkus-datasource_quarkus.datasource.named-data-sources">Additional named datasources</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-datasource_quarkus.datasource.-datasource-name-.db-kind"></a><code><a href="#quarkus-datasource_quarkus.datasource.-datasource-name-.db-kind">quarkus.datasource."datasource-name".db-kind</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The kind of database we will connect to (e.g. h2, postgresql&#8230;&#8203;).</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-datasource_quarkus.datasource.-datasource-name-.username"></a><code><a href="#quarkus-datasource_quarkus.datasource.-datasource-name-.username">quarkus.datasource."datasource-name".username</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource username</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-datasource_quarkus.datasource.-datasource-name-.password"></a><code><a href="#quarkus-datasource_quarkus.datasource.-datasource-name-.password">quarkus.datasource."datasource-name".password</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource password</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-datasource_quarkus.datasource.-datasource-name-.credentials-provider"></a><code><a href="#quarkus-datasource_quarkus.datasource.-datasource-name-.credentials-provider">quarkus.datasource."datasource-name".credentials-provider</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The credentials provider name</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-datasource_quarkus.datasource.-datasource-name-.credentials-provider-name"></a><code><a href="#quarkus-datasource_quarkus.datasource.-datasource-name-.credentials-provider-name">quarkus.datasource."datasource-name".credentials-provider-name</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The credentials provider bean name.
 It is the <code>&amp;#64;Named</code> value of the credentials provider bean. It is used to discriminate if multiple CredentialsProvider beans are available.
 For Vault it is: vault-credentials-provider. Not necessary if there is only one credentials provider available.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-datasource_quarkus.datasource.-datasource-name-.max-size"></a><code><a href="#quarkus-datasource_quarkus.datasource.-datasource-name-.max-size">quarkus.datasource."datasource-name".max-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">

</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>20</code></p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect1">
<h2 id="jdbc-configuration"><a class="anchor" href="#jdbc-configuration"></a>JDBC Configuration Reference</h2>
<div class="sectionbody">
<div class="paragraph configuration-legend">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> Configuration property fixed at build time - All other configuration properties are overridable at runtime</p>
</div>
<table class="tableblock frame-all grid-all stretch configuration-reference searchable">
<colgroup>
<col style="width: 80%;">
<col style="width: 10%;">
<col style="width: 10%;">
</colgroup>
<tbody>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-agroal_configuration"></a><a href="#quarkus-agroal_configuration">Configuration property</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-agroal_quarkus.datasource.jdbc"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc">quarkus.datasource.jdbc</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>If we create a JDBC datasource for this datasource.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-agroal_quarkus.datasource.jdbc.driver"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.driver">quarkus.datasource.jdbc.driver</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource driver class name</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-agroal_quarkus.datasource.jdbc.transactions"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.transactions">quarkus.datasource.jdbc.transactions</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether we want to use regular JDBC transactions, XA, or disable all transactional capabilities.
 When enabling XA you will need a driver implementing <code>javax.sql.XADataSource</code>.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>enabled</code>, <code>xa</code>, <code>disabled</code></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>enabled</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-agroal_quarkus.datasource.jdbc.enable-metrics"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.enable-metrics">quarkus.datasource.jdbc.enable-metrics</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Enable datasource metrics collection. If unspecified, collecting metrics will be enabled by default if the smallrye-metrics extension is active.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.url"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.url">quarkus.datasource.jdbc.url</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource URL</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.initial-size"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.initial-size">quarkus.datasource.jdbc.initial-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The initial size of the pool. Usually you will want to set the initial size to match at least the minimal size, but this is not enforced so to allow for architectures which prefer a lazy initialization of the connections on boot, while being able to sustain a minimal pool size after boot.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.min-size"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.min-size">quarkus.datasource.jdbc.min-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource pool minimum size</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>0</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.max-size"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.max-size">quarkus.datasource.jdbc.max-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource pool maximum size</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>20</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.background-validation-interval"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.background-validation-interval">quarkus.datasource.jdbc.background-validation-interval</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The interval at which we validate idle connections in the background.
 Set to <code>0</code> to disable background validation.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>2M</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.acquisition-timeout"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.acquisition-timeout">quarkus.datasource.jdbc.acquisition-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The timeout before cancelling the acquisition of a new connection</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>5</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.leak-detection-interval"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.leak-detection-interval">quarkus.datasource.jdbc.leak-detection-interval</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The interval at which we check for connection leaks.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.idle-removal-interval"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.idle-removal-interval">quarkus.datasource.jdbc.idle-removal-interval</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The interval at which we try to remove idle connections.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>5M</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.max-lifetime"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.max-lifetime">quarkus.datasource.jdbc.max-lifetime</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The max lifetime of a connection.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.transaction-isolation-level"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.transaction-isolation-level">quarkus.datasource.jdbc.transaction-isolation-level</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The transaction isolation level.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>undefined</code>, <code>none</code>, <code>read-uncommitted</code>, <code>read-committed</code>, <code>repeatable-read</code>, <code>serializable</code></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.detect-statement-leaks"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.detect-statement-leaks">quarkus.datasource.jdbc.detect-statement-leaks</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>When enabled Agroal will be able to produce a warning when a connection is returned to the pool without the application having closed all open statements. This is unrelated with tracking of open connections. Disable for peak performance, but only when there&#8217;s high confidence that no leaks are happening.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.new-connection-sql"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.new-connection-sql">quarkus.datasource.jdbc.new-connection-sql</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Query executed when first using a connection.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.validation-query-sql"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.validation-query-sql">quarkus.datasource.jdbc.validation-query-sql</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Query executed to validate a connection.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.jdbc.pooling-enabled"></a><code><a href="#quarkus-agroal_quarkus.datasource.jdbc.pooling-enabled">quarkus.datasource.jdbc.pooling-enabled</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Disable pooling to prevent reuse of Connections. Use this with when an external pool manages the life-cycle of Connections.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-agroal_quarkus.datasource.named-data-sources"></a><a href="#quarkus-agroal_quarkus.datasource.named-data-sources">Additional named datasources</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc">quarkus.datasource."datasource-name".jdbc</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>If we create a JDBC datasource for this datasource.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.driver"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.driver">quarkus.datasource."datasource-name".jdbc.driver</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource driver class name</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.transactions"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.transactions">quarkus.datasource."datasource-name".jdbc.transactions</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether we want to use regular JDBC transactions, XA, or disable all transactional capabilities.
 When enabling XA you will need a driver implementing <code>javax.sql.XADataSource</code>.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>enabled</code>, <code>xa</code>, <code>disabled</code></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>enabled</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.enable-metrics"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.enable-metrics">quarkus.datasource."datasource-name".jdbc.enable-metrics</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Enable datasource metrics collection. If unspecified, collecting metrics will be enabled by default if the smallrye-metrics extension is active.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.url"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.url">quarkus.datasource."datasource-name".jdbc.url</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource URL</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.initial-size"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.initial-size">quarkus.datasource."datasource-name".jdbc.initial-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The initial size of the pool. Usually you will want to set the initial size to match at least the minimal size, but this is not enforced so to allow for architectures which prefer a lazy initialization of the connections on boot, while being able to sustain a minimal pool size after boot.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.min-size"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.min-size">quarkus.datasource."datasource-name".jdbc.min-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource pool minimum size</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>0</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.max-size"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.max-size">quarkus.datasource."datasource-name".jdbc.max-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource pool maximum size</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>20</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.background-validation-interval"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.background-validation-interval">quarkus.datasource."datasource-name".jdbc.background-validation-interval</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The interval at which we validate idle connections in the background.
 Set to <code>0</code> to disable background validation.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>2M</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.acquisition-timeout"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.acquisition-timeout">quarkus.datasource."datasource-name".jdbc.acquisition-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The timeout before cancelling the acquisition of a new connection</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>5</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.leak-detection-interval"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.leak-detection-interval">quarkus.datasource."datasource-name".jdbc.leak-detection-interval</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The interval at which we check for connection leaks.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.idle-removal-interval"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.idle-removal-interval">quarkus.datasource."datasource-name".jdbc.idle-removal-interval</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The interval at which we try to remove idle connections.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>5M</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.max-lifetime"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.max-lifetime">quarkus.datasource."datasource-name".jdbc.max-lifetime</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The max lifetime of a connection.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.transaction-isolation-level"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.transaction-isolation-level">quarkus.datasource."datasource-name".jdbc.transaction-isolation-level</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The transaction isolation level.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>undefined</code>, <code>none</code>, <code>read-uncommitted</code>, <code>read-committed</code>, <code>repeatable-read</code>, <code>serializable</code></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.detect-statement-leaks"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.detect-statement-leaks">quarkus.datasource."datasource-name".jdbc.detect-statement-leaks</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>When enabled Agroal will be able to produce a warning when a connection is returned to the pool without the application having closed all open statements. This is unrelated with tracking of open connections. Disable for peak performance, but only when there&#8217;s high confidence that no leaks are happening.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.new-connection-sql"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.new-connection-sql">quarkus.datasource."datasource-name".jdbc.new-connection-sql</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Query executed when first using a connection.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.validation-query-sql"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.validation-query-sql">quarkus.datasource."datasource-name".jdbc.validation-query-sql</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Query executed to validate a connection.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.pooling-enabled"></a><code><a href="#quarkus-agroal_quarkus.datasource.-datasource-name-.jdbc.pooling-enabled">quarkus.datasource."datasource-name".jdbc.pooling-enabled</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Disable pooling to prevent reuse of Connections. Use this with when an external pool manages the life-cycle of Connections.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
</tbody>
</table>
<div id="duration-note-anchor" class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="title">About the Duration format</div>
<div class="paragraph">
<p>The format for durations uses the standard <code>java.time.Duration</code> format.
You can learn more about it in the <a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html#parse-java.lang.CharSequence-">Duration#parse() javadoc</a>.</p>
</div>
<div class="paragraph">
<p>You can also provide duration values starting with a number.
In this case, if the value consists only of a number, the converter treats the value as seconds.
Otherwise, <code>PT</code> is implicitly prepended to the value to obtain a standard <code>java.time.Duration</code> format.</p>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="jdbc-url"><a class="anchor" href="#jdbc-url"></a>JDBC URL Reference</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Each of the supported databases contains different JDBC URL configuration options.
Going into each of those options is beyond the scope of this document,
but the following section gives an overview of each database URL and a link to the official documentation.</p>
</div>
<div class="sect2">
<h3 id="h2"><a class="anchor" href="#h2"></a>H2</h3>
<div class="paragraph">
<p><code>jdbc:h2:{ {.|mem:}[name] | [file:]fileName | {tcp|ssl}:[//]server[:port][,server2[:port]]/name }[;key=value&#8230;&#8203;]</code></p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">Example</dt>
<dd>
<p><code>jdbc:h2:tcp://localhost/~/test</code>, <code>jdbc:h2:mem:myDB</code></p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>H2 is an embedded database.
It can run as a server, based on a file, or live completely in memory.
All of these options are available as listed above.
You can find more information at the <a href="https://h2database.com/html/features.html?highlight=url&amp;search=url#database_url">official documentation</a>.</p>
</div>
</div>
<div class="sect2">
<h3 id="postgresql"><a class="anchor" href="#postgresql"></a>PostgreSQL</h3>
<div class="paragraph">
<p>PostgreSQL only runs as a server, as do the rest of the databases below.
As such, you must specify connection details, or use the defaults.</p>
</div>
<div class="paragraph">
<p><code>jdbc:postgresql:[//][host][:port][/database][?key=value&#8230;&#8203;]</code></p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">Example</dt>
<dd>
<p><code>jdbc:postgresql://localhost/test</code></p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>Defaults for the different parts are as follows:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>host</code></dt>
<dd>
<p>localhost</p>
</dd>
<dt class="hdlist1"><code>port</code></dt>
<dd>
<p>5432</p>
</dd>
<dt class="hdlist1"><code>database</code></dt>
<dd>
<p>same name as the username</p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>The <a href="https://jdbc.postgresql.org/documentation/head/connect.html">official documentation</a> go into more detail and list optional parameters as well.</p>
</div>
</div>
<div class="sect2">
<h3 id="db2"><a class="anchor" href="#db2"></a>DB2</h3>
<div class="paragraph">
<p><code>jdbc:db2://&lt;serverName&gt;[:&lt;portNumber&gt;]/&lt;databaseName&gt;[:&lt;key1&gt;=&lt;value&gt;;[&lt;key2&gt;=&lt;value2&gt;;]]</code></p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">Example</dt>
<dd>
<p><code>jdbc:db2://localhost:50000/MYDB:user=dbadm;password=dbadm;</code></p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>See the <a href="https://www.ibm.com/support/knowledgecenter/SSEPGG_11.5.0/com.ibm.db2.luw.apdv.java.doc/src/tpc/imjcc_r0052342.html">official documentation</a> for more detail on URL syntax and additional supported options.</p>
</div>
</div>
<div class="sect2">
<h3 id="mariadb"><a class="anchor" href="#mariadb"></a>MariaDB</h3>
<div class="paragraph">
<p><code>jdbc:mariadb:[replication:|failover:|sequential:|aurora:]//&lt;hostDescription&gt;[,&lt;hostDescription&gt;&#8230;&#8203;]/[database][?&lt;key1&gt;=&lt;value1&gt;[&amp;&lt;key2&gt;=&lt;value2&gt;]]</code>
 hostDescription:: <code>&lt;host&gt;[:&lt;portnumber&gt;]  or address=(host=&lt;host&gt;)[(port=&lt;portnumber&gt;)][(type=(master|slave))]</code></p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">Example</dt>
<dd>
<p><code>jdbc:mariadb://localhost:3306/test</code></p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>You can find more information about this feature and others detailed in the <a href="https://mariadb.com/kb/en/library/about-mariadb-connector-j/">official documentation</a>.</p>
</div>
</div>
<div class="sect2">
<h3 id="mysql"><a class="anchor" href="#mysql"></a>MySQL</h3>
<div class="paragraph">
<p><code>jdbc:mysql:[replication:|failover:|sequential:|aurora:]//&lt;hostDescription&gt;[,&lt;hostDescription&gt;&#8230;&#8203;]/[database][?&lt;key1&gt;=&lt;value1&gt;[&amp;&lt;key2&gt;=&lt;value2&gt;]]</code>
 hostDescription:: <code>&lt;host&gt;[:&lt;portnumber&gt;]  or address=(host=&lt;host&gt;)[(port=&lt;portnumber&gt;)][(type=(master|slave))]</code></p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">Example</dt>
<dd>
<p><code>jdbc:mysql://localhost:3306/test</code></p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>You can find more information about this feature and others detailed in the <a href="https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference.html">official documentation</a>.</p>
</div>
</div>
<div class="sect2">
<h3 id="microsoft-sql-server"><a class="anchor" href="#microsoft-sql-server"></a>Microsoft SQL Server</h3>
<div class="paragraph">
<p>Microsoft SQL Server takes a connection URL in the following form:</p>
</div>
<div class="paragraph">
<p><code>jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]</code></p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">Example</dt>
<dd>
<p><code>jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks</code></p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>The Microsoft SQL Server JDBC driver works essentially the same as the others.
More details can be found in the <a href="https://docs.microsoft.com/en-us/sql/connect/jdbc/connecting-to-sql-server-with-the-jdbc-driver?view=sql-server-2017">official documentation</a>.</p>
</div>
</div>
<div class="sect2">
<h3 id="derby"><a class="anchor" href="#derby"></a>Derby</h3>
<div class="paragraph">
<p><code>jdbc:derby:[//serverName[:portNumber]/][memory:]databaseName[;property=value[;property=value]]</code></p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">Example</dt>
<dd>
<p><code>jdbc:derby://localhost:1527/myDB</code>, <code>jdbc:derby:memory:myDB;create=true</code></p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>Derby is an embedded database.
It can run as a server, based on a file, or live completely in memory.
All of these options are available as listed above.
You can find more information at the <a href="https://db.apache.org/derby/docs/10.8/devguide/cdevdvlp17453.html#cdevdvlp17453">official documentation</a>.</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="reactive-configuration"><a class="anchor" href="#reactive-configuration"></a>Reactive Datasource Configuration Reference</h2>
<div class="sectionbody">
<div class="paragraph configuration-legend">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> Configuration property fixed at build time - All other configuration properties are overridable at runtime</p>
</div>
<table class="tableblock frame-all grid-all stretch configuration-reference searchable">
<colgroup>
<col style="width: 80%;">
<col style="width: 10%;">
<col style="width: 10%;">
</colgroup>
<tbody>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-reactive-datasource_configuration"></a><a href="#quarkus-reactive-datasource_configuration">Configuration property</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-reactive-datasource_quarkus.datasource.reactive"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive">quarkus.datasource.reactive</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>If we create a Reactive datasource for this datasource.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.cache-prepared-statements"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.cache-prepared-statements">quarkus.datasource.reactive.cache-prepared-statements</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether prepared statements should be cached on the client side.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.url"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.url">quarkus.datasource.reactive.url</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource URL.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.max-size"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.max-size">quarkus.datasource.reactive.max-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The datasource pool maximum size.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.trust-all"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.trust-all">quarkus.datasource.reactive.trust-all</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether all server certificates should be trusted.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-pem"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-pem">quarkus.datasource.reactive.trust-certificate-pem</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>PEM Trust config is disabled by default.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-pem.certs"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-pem.certs">quarkus.datasource.reactive.trust-certificate-pem.certs</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Comma-separated list of the trust certificate files (Pem format).</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">list of string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-jks"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-jks">quarkus.datasource.reactive.trust-certificate-jks</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>JKS config is disabled by default.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-jks.path"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-jks.path">quarkus.datasource.reactive.trust-certificate-jks.path</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Path of the key file (JKS format).</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-jks.password"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-jks.password">quarkus.datasource.reactive.trust-certificate-jks.password</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Password of the key file.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-pfx"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-pfx">quarkus.datasource.reactive.trust-certificate-pfx</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>PFX config is disabled by default.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-pfx.path"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-pfx.path">quarkus.datasource.reactive.trust-certificate-pfx.path</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Path to the key file (PFX format).</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-pfx.password"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.trust-certificate-pfx.password">quarkus.datasource.reactive.trust-certificate-pfx.password</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Password of the key.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pem"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pem">quarkus.datasource.reactive.key-certificate-pem</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>PEM Key/cert config is disabled by default.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pem.keys"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pem.keys">quarkus.datasource.reactive.key-certificate-pem.keys</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Comma-separated list of the path to the key files (Pem format).</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">list of string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pem.certs"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pem.certs">quarkus.datasource.reactive.key-certificate-pem.certs</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Comma-separated list of the path to the certificate files (Pem format).</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">list of string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-jks"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-jks">quarkus.datasource.reactive.key-certificate-jks</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>JKS config is disabled by default.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-jks.path"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-jks.path">quarkus.datasource.reactive.key-certificate-jks.path</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Path of the key file (JKS format).</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-jks.password"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-jks.password">quarkus.datasource.reactive.key-certificate-jks.password</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Password of the key file.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pfx"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pfx">quarkus.datasource.reactive.key-certificate-pfx</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>PFX config is disabled by default.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pfx.path"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pfx.path">quarkus.datasource.reactive.key-certificate-pfx.path</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Path to the key file (PFX format).</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pfx.password"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.key-certificate-pfx.password">quarkus.datasource.reactive.key-certificate-pfx.password</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Password of the key.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-datasource_quarkus.datasource.reactive.thread-local"></a><code><a href="#quarkus-reactive-datasource_quarkus.datasource.reactive.thread-local">quarkus.datasource.reactive.thread-local</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Experimental: use one connection pool per thread.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
</tbody>
</table>
<div class="sect2">
<h3 id="reactive-db2-configuration"><a class="anchor" href="#reactive-db2-configuration"></a>Reactive DB2 Configuration</h3>
<div class="paragraph configuration-legend">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> Configuration property fixed at build time - All other configuration properties are overridable at runtime</p>
</div>
<table class="tableblock frame-all grid-all stretch configuration-reference searchable">
<colgroup>
<col style="width: 80%;">
<col style="width: 10%;">
<col style="width: 10%;">
</colgroup>
<tbody>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-reactive-db2-client_configuration"></a><a href="#quarkus-reactive-db2-client_configuration">Configuration property</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-db2-client_quarkus.datasource.reactive.db2.ssl"></a><code><a href="#quarkus-reactive-db2-client_quarkus.datasource.reactive.db2.ssl">quarkus.datasource.reactive.db2.ssl</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether SSL/TLS is enabled.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="reactive-mariadbmysql-specific-configuration"><a class="anchor" href="#reactive-mariadbmysql-specific-configuration"></a>Reactive MariaDB/MySQL Specific Configuration</h3>
<div class="paragraph configuration-legend">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> Configuration property fixed at build time - All other configuration properties are overridable at runtime</p>
</div>
<table class="tableblock frame-all grid-all stretch configuration-reference searchable">
<colgroup>
<col style="width: 80%;">
<col style="width: 10%;">
<col style="width: 10%;">
</colgroup>
<tbody>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-reactive-mysql-client_configuration"></a><a href="#quarkus-reactive-mysql-client_configuration">Configuration property</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-mysql-client_quarkus.datasource.reactive.mysql.charset"></a><code><a href="#quarkus-reactive-mysql-client_quarkus.datasource.reactive.mysql.charset">quarkus.datasource.reactive.mysql.charset</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Charset for connections.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-mysql-client_quarkus.datasource.reactive.mysql.collation"></a><code><a href="#quarkus-reactive-mysql-client_quarkus.datasource.reactive.mysql.collation">quarkus.datasource.reactive.mysql.collation</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Collation for connections.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-mysql-client_quarkus.datasource.reactive.mysql.ssl-mode"></a><code><a href="#quarkus-reactive-mysql-client_quarkus.datasource.reactive.mysql.ssl-mode">quarkus.datasource.reactive.mysql.ssl-mode</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Desired security state of the connection to the server.
 See <a href="https://dev.mysql.com/doc/refman/8.0/en/connection-options.html#option_general_ssl-mode">MySQL Reference Manual</a>.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>disabled</code>, <code>preferred</code>, <code>required</code>, <code>verify-ca</code>, <code>verify-identity</code></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>disabled</code></p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="reactive-postgresql-specific-configuration"><a class="anchor" href="#reactive-postgresql-specific-configuration"></a>Reactive PostgreSQL Specific Configuration</h3>
<div class="paragraph configuration-legend">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> Configuration property fixed at build time - All other configuration properties are overridable at runtime</p>
</div>
<table class="tableblock frame-all grid-all stretch configuration-reference searchable">
<colgroup>
<col style="width: 80%;">
<col style="width: 10%;">
<col style="width: 10%;">
</colgroup>
<tbody>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-reactive-pg-client_configuration"></a><a href="#quarkus-reactive-pg-client_configuration">Configuration property</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-pg-client_quarkus.datasource.reactive.postgresql.pipelining-limit"></a><code><a href="#quarkus-reactive-pg-client_quarkus.datasource.reactive.postgresql.pipelining-limit">quarkus.datasource.reactive.postgresql.pipelining-limit</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The maximum number of inflight database commands that can be pipelined.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-reactive-pg-client_quarkus.datasource.reactive.postgresql.ssl-mode"></a><code><a href="#quarkus-reactive-pg-client_quarkus.datasource.reactive.postgresql.ssl-mode">quarkus.datasource.reactive.postgresql.ssl-mode</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>SSL operating mode of the client.
 See <a href="https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-PROTECTION">Protection Provided in Different Modes</a>.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>disable</code>, <code>allow</code>, <code>prefer</code>, <code>require</code>, <code>verify-ca</code>, <code>verify-full</code></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>disable</code></p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
    </div>
  </div>
</div>

  </div>

  <div class="content project-footer">
  <div class="footer-section">
    <div class="logo-wrapper">
      <a href="/"><img src="/assets/images/quarkus_logo_horizontal_rgb_reverse.svg" class="project-logo" title="Quarkus"></a>
    </div>
  </div>
  <div class="grid-wrapper">
    <p class="grid__item width-3-12">Quarkus is open. All dependencies of this project are available under the <a href='https://www.apache.org/licenses/LICENSE-2.0' target='_blank'>Apache Software License 2.0</a> or compatible license.<br /><br />This website was built with <a href='https://jekyllrb.com/' target='_blank'>Jekyll</a>, is hosted on <a href='https://pages.github.com/' target='_blank'>Github Pages</a> and is completely open source. If you want to make it better, <a href='https://github.com/quarkusio/quarkusio.github.io' target='_blank'>fork the website</a> and show us what you’ve got.</p>

    
      <div class="width-1-12 project-links">
        <span>Navigation</span>
        <ul class="footer-links width-1-12">
          
            <li><a href="/">Home</a></li>
          
            <li><a href="/guides">Guides</a></li>
          
            <li><a href="/community/#contributing">Contribute</a></li>
          
            <li><a href="/faq">FAQ</a></li>
          
            <li><a href="/get-started">Get Started</a></li>
          
        </ul>
      </div>
    
      <div class="width-1-12 project-links">
        <span>Contribute</span>
        <ul class="footer-links width-1-12">
          
            <li><a href="https://twitter.com/quarkusio">Follow us</a></li>
          
            <li><a href="https://github.com/quarkusio">GitHub</a></li>
          
            <li><a href="/security">Security&nbsp;policy</a></li>
          
        </ul>
      </div>
    
      <div class="width-1-12 project-links">
        <span>Get Help</span>
        <ul class="footer-links width-1-12">
          
            <li><a href="https://groups.google.com/forum/#!forum/quarkus-dev">Forums</a></li>
          
            <li><a href="https://quarkusio.zulipchat.com">Chatroom</a></li>
          
        </ul>
      </div>
    

    
      <div class="width-3-12 more-links">
        <span>Quarkus is made of community projects</span>
        <ul class="footer-links">
          
            <li><a href="https://vertx.io/" target="_blank">Eclipse Vert.x</a></li>
          
            <li><a href="https://microprofile.io" target="_blank">Eclipse MicroProfile</a></li>
          
            <li><a href="https://hibernate.org" target="_blank">Hibernate</a></li>
          
            <li><a href="https://netty.io" target="_blank">Netty</a></li>
          
            <li><a href="https://resteasy.github.io" target="_blank">RESTEasy</a></li>
          
            <li><a href="https://camel.apache.org" target="_blank">Apache Camel</a></li>
          
            <li><a href="https://code.quarkus.io/" target="_blank">And many more...</a></li>
          
        </ul>
      </div>
    
  </div>
</div>
  <div class="content redhat-footer">
  <div class="grid-wrapper">
    <span class="licence">
      <i class="fab fa-creative-commons"></i><i class="fab fa-creative-commons-by"></i> <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC by 3.0</a> | <a href="https://www.redhat.com/en/about/privacy-policy">Privacy Policy</a>
    </span>
    <span class="redhat">
      Sponsored by
    </span>
    <span class="redhat-logo">
      <a href="https://www.redhat.com/" target="_blank"><img src="/assets/images/redhat_reversed.svg"></a>
    </span>
  </div>
</div>


  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" integrity="sha384-8gBf6Y4YYq7Jx97PIqmTwLPin4hxIzQw5aDmUg/DDhul9fFpbbLcLh3nTIIDJKhx" crossorigin="anonymous"></script>
  <script type="text/javascript" src="/assets/javascript/mobile-nav.js"></script>
  <script type="text/javascript" src="/assets/javascript/scroll-down.js"></script>
  <script src="/assets/javascript/satellite.js" type="text/javascript"></script>
  <script src="https://quarkus.io/guides/javascript/config.js" type="text/javascript"></script>
  <script src="/assets/javascript/search-filter.js" type="text/javascript"></script>
  <script src="/assets/javascript/back-to-top.js" type="text/javascript"></script>
</body>

</html>
